package com.wy2.eclipse.tool.lib.git;

/**
 * git元素状态枚举
 * @author nnsword
 * @date 2018年1月13日下午4:42:06
 *
 */
public enum GitElementStatus {

    None(-1,"未知的"),
    Added(0,"添的"),
    Untracked(1,"未跟踪的"),
    Modified(2,"修改过的"),
    Missing(3,"丢失的"),
    Removed(4,"移除的");
    
    private Integer status;
    private String statusName;
    
    private GitElementStatus(Integer status,String statusName) {
        this.status=status;
        this.statusName=statusName;
    }
    
    public Integer getStatus() {
        return this.status;
    }

    public String getStatusName() {
        return statusName;
    }
    
    public static GitElementStatus Parse(Integer status) {
        for (GitElementStatus e : GitElementStatus.values()) {  
            if(e.getStatus()==status) {
                return e;
            }
        }         
        return GitElementStatus.None;
    }
    
}
